<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
</head>
<body>
 	<script type="text/javascript">
 		// 随机数 [0,1)
 		console.log(Math.random())

 		// 圆周率
 		console.log(Math.PI)

 		console.log("四舍五入", Math.round(10.6))//11

 		console.log("向上取整", Math.ceil(10.1))//11

 		console.log("向下取整", Math.floor(10.9))//10

 		console.log("平方" , Math.pow(10, 3))//1000 10的三次方

 		console.log("开根号", Math.sqrt(2))// 1.4142135623730951

 		console.log("最大值", Math.max(1,3,4,2,6,8,9,70))
 		console.log("最小值", Math.min(1,3,4,2,6,8,9,70))

 		// 取小数toFixed(保留几位小数)
 		let a = 9.21554152155
 		console.log(a.toFixed(2))//9.32
 	</script>
</body>
</html>